<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AceButton: /home/brian/src/AceButton/src/ace_button/AceButton.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AceButton
   &#160;<span id="projectnumber">1.10.0</span>
   </div>
   <div id="projectbrief">An adjustable, compact, event-driven button library for Arduino.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_ebbe9b537c0e01d975153fa119b09658.html">ace_button</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">AceButton.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">MIT License</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">Copyright (c) 2018 Brian T. Park</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">Permission is hereby granted, free of charge, to any person obtaining a copy</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">in the Software without restriction, including without limitation the rights</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">copies of the Software, and to permit persons to whom the Software is</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">furnished to do so, subject to the following conditions:</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">The above copyright notice and this permission notice shall be included in all</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">copies or substantial portions of the Software.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">SOFTWARE.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef ACE_BUTTON_ACE_BUTTON_H</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define ACE_BUTTON_ACE_BUTTON_H</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;Arduino.h&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;ButtonConfig.h&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">class </span>__FlashStringHelper;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">namespace </span>ace_button {</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html">   54</a></span>&#160;<span class="keyword">class </span><a class="code" href="classace__button_1_1AceButton.html">AceButton</a> {</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="comment">// The supported event types.</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#ae723d826fe219a8415764b9fed5d8976">   59</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#ae723d826fe219a8415764b9fed5d8976">kEventPressed</a> = 0;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#ada5bd7c31950e2acdb8a9464e795c13c">   62</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#ada5bd7c31950e2acdb8a9464e795c13c">kEventReleased</a> = 1;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a21797e5e069da3f7bba42b40ab3a7305">   68</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#a21797e5e069da3f7bba42b40ab3a7305">kEventClicked</a> = 2;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a0c63f30106e4688425ba37d8f7a9546b">   74</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#a0c63f30106e4688425ba37d8f7a9546b">kEventDoubleClicked</a> = 3;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a769599d288f64dc0e55a69184596d804">   80</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#a769599d288f64dc0e55a69184596d804">kEventLongPressed</a> = 4;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a9c4195cb128da40677ea223eb81743c9">   88</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#a9c4195cb128da40677ea223eb81743c9">kEventRepeatPressed</a> = 5;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#aad25e42744fa8dd6a13ab483409a1833">   99</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#aad25e42744fa8dd6a13ab483409a1833">kEventLongReleased</a> = 6;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#ad198e86bd7270c871aaa27a33687399e">  111</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#ad198e86bd7270c871aaa27a33687399e">kEventHeartBeat</a> = 7;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#afe8e8e22146f510afa487e6ec98b6253">  119</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="classace__button_1_1AceButton.html#afe8e8e22146f510afa487e6ec98b6253">kButtonStateUnknown</a> = 127;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keyword">static</span> __FlashStringHelper* <a class="code" href="classace__button_1_1AceButton.html#a2e1fc3e4d97d5a390a9e00983cc780fe">eventName</a>(uint8_t event);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a3c480636223edc899a79c821c32c6982">  160</a></span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classace__button_1_1AceButton.html#a3c480636223edc899a79c821c32c6982">AceButton</a>(</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        uint8_t pin = 0,</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        uint8_t defaultReleasedState = HIGH,</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        uint8_t <span class="keywordtype">id</span> = 0</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    ) :</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        mButtonConfig(<a class="code" href="classace__button_1_1ButtonConfig.html">ButtonConfig</a>::getSystemButtonConfig()) {</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;      <a class="code" href="classace__button_1_1AceButton.html#a18c47304c694c6f084a343a7c83bef34">init</a>(pin, defaultReleasedState, <span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    }</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a279fc7e70cecaf94c12cb4dc1fb2ab18">  192</a></span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classace__button_1_1AceButton.html#a279fc7e70cecaf94c12cb4dc1fb2ab18">AceButton</a>(</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <a class="code" href="classace__button_1_1ButtonConfig.html">ButtonConfig</a>* buttonConfig,</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        uint8_t pin = 0,</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        uint8_t defaultReleasedState = HIGH,</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        uint8_t <span class="keywordtype">id</span> = 0) {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;      <a class="code" href="classace__button_1_1AceButton.html#a18c47304c694c6f084a343a7c83bef34">init</a>(buttonConfig, pin, defaultReleasedState, <span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classace__button_1_1AceButton.html#a18c47304c694c6f084a343a7c83bef34">init</a>(</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        uint8_t pin = 0,</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        uint8_t defaultReleasedState = HIGH,</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        uint8_t <span class="keywordtype">id</span> = 0);</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classace__button_1_1AceButton.html#a18c47304c694c6f084a343a7c83bef34">init</a>(</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <a class="code" href="classace__button_1_1ButtonConfig.html">ButtonConfig</a>* buttonConfig,</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        uint8_t pin = 0,</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        uint8_t defaultReleasedState = HIGH,</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        uint8_t <span class="keywordtype">id</span> = 0);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a7d309d463b50a59a202067a7228149f0">  223</a></span>&#160;    <a class="code" href="classace__button_1_1ButtonConfig.html">ButtonConfig</a>* <a class="code" href="classace__button_1_1AceButton.html#a7d309d463b50a59a202067a7228149f0">getButtonConfig</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;      <span class="keywordflow">return</span> mButtonConfig;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    }</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a04b7e1d44e41481d2c36501262e35a04">  232</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classace__button_1_1AceButton.html#a04b7e1d44e41481d2c36501262e35a04">setButtonConfig</a>(<a class="code" href="classace__button_1_1ButtonConfig.html">ButtonConfig</a>* buttonConfig) {</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;      mButtonConfig = buttonConfig;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    }</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160; </div>
<div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a7769fa58769bc4cf0a0ea9c68072d4de">  266</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classace__button_1_1AceButton.html#a7769fa58769bc4cf0a0ea9c68072d4de">setEventHandler</a>(<a class="code" href="classace__button_1_1ButtonConfig.html#a6d9db3c7b221b474c3cfd8fca5f4ba1e">ButtonConfig::EventHandler</a> eventHandler) {</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;      mButtonConfig-&gt;<a class="code" href="classace__button_1_1ButtonConfig.html#af916ea5ae0194afeac3a6fd6e25a13d1">setEventHandler</a>(eventHandler);</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    }</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160; </div>
<div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#ab33671acf4de4912b1f00fad28246ae0">  271</a></span>&#160;    uint8_t <a class="code" href="classace__button_1_1AceButton.html#ab33671acf4de4912b1f00fad28246ae0">getPin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mPin; }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160; </div>
<div class="line"><a name="l00274"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a244a2ea3166f2d886ccd94a44286b835">  274</a></span>&#160;    uint8_t <a class="code" href="classace__button_1_1AceButton.html#a244a2ea3166f2d886ccd94a44286b835">getId</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mId; }</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160; </div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    uint8_t <a class="code" href="classace__button_1_1AceButton.html#a5c253900d6d6c0035095a322ee7f9aa1">getDefaultReleasedState</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160; </div>
<div class="line"><a name="l00292"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#abb9c10c1fc6df01fae071ccfcb906935">  292</a></span>&#160;    uint8_t <a class="code" href="classace__button_1_1AceButton.html#abb9c10c1fc6df01fae071ccfcb906935">getLastButtonState</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;      <span class="keywordflow">return</span> mLastButtonState;</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    }</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160; </div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classace__button_1_1AceButton.html#af710048a654fa5d5e45405661282a7b1">check</a>();</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160; </div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classace__button_1_1AceButton.html#a510c8e84a6bd79157489534a117814e3">checkState</a>(uint8_t buttonState);</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160; </div>
<div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#ac1a720cb3ad156081a132ede781c5ea8">  326</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classace__button_1_1AceButton.html#ac1a720cb3ad156081a132ede781c5ea8">isReleased</a>(uint8_t buttonState)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;      <span class="keywordflow">return</span> buttonState == <a class="code" href="classace__button_1_1AceButton.html#a5c253900d6d6c0035095a322ee7f9aa1">getDefaultReleasedState</a>();</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    }</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160; </div>
<div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="classace__button_1_1AceButton.html#a940975bbdf673f6411b0efc008ba9981">  337</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classace__button_1_1AceButton.html#a940975bbdf673f6411b0efc008ba9981">isPressedRaw</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;      <span class="keywordflow">return</span> !<a class="code" href="classace__button_1_1AceButton.html#ac1a720cb3ad156081a132ede781c5ea8">isReleased</a>(mButtonConfig-&gt;<a class="code" href="classace__button_1_1ButtonConfig.html#a5dab877bf124bfdf5a5eb703ca123027">readButton</a>(mPin));</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    }</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160; </div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;  <span class="comment">// Some of these private methods may be useful to the calling client but I</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;  <span class="comment">// don&#39;t want to release them to the public because I want to keep the API as</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;  <span class="comment">// small as possible for easier long term maintenance. (Once a method is</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;  <span class="comment">// released to the public, it must be supported forever to ensure backwards</span></div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;  <span class="comment">// compatibility with older client code.)</span></div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160; </div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    <span class="comment">// Disable copy-constructor and assignment operator</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    <a class="code" href="classace__button_1_1AceButton.html#a3c480636223edc899a79c821c32c6982">AceButton</a>(<span class="keyword">const</span> <a class="code" href="classace__button_1_1AceButton.html">AceButton</a>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    <a class="code" href="classace__button_1_1AceButton.html">AceButton</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classace__button_1_1AceButton.html">AceButton</a>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160; </div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    <span class="keywordtype">void</span> setPin(uint8_t pin) { mPin = pin; }</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160; </div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <span class="keywordtype">void</span> setDefaultReleasedState(uint8_t state);</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160; </div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    <span class="keywordtype">void</span> setId(uint8_t <span class="keywordtype">id</span>) { mId = id; }</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160; </div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    <span class="comment">// Various bit masks to store a boolean flag in the &#39;mFlags&#39; field.</span></div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    <span class="comment">// We use bit masks to save static RAM. If we had used a &#39;bool&#39; type, each</span></div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;    <span class="comment">// of these would consume one byte.</span></div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    <span class="keyword">typedef</span> uint16_t FlagType;</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagDefaultReleasedState = 0x01;</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagDebouncing = 0x02;</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagPressed = 0x04; <span class="comment">// mLastPressTime is valid</span></div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagClicked = 0x08; <span class="comment">// mLastClickTime valid</span></div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagDoubleClicked = 0x10;</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagLongPressed = 0x20;</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagRepeatPressed = 0x40; <span class="comment">// mLastRepeatPressTime</span></div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagClickPostponed = 0x80;</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> FlagType kFlagHeartRunning = 0x100; <span class="comment">// mLastHeartBeatTime valid</span></div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160; </div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;    <span class="keywordtype">bool</span> isFlag(FlagType flag)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;      <span class="keywordflow">return</span> mFlags &amp; flag;</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    }</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160; </div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    <span class="keywordtype">void</span> setFlag(FlagType flag) {</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;      mFlags |= flag;</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    }</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160; </div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="keywordtype">void</span> clearFlag(FlagType flag) {</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;      mFlags &amp;= ~flag;</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;    }</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160; </div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <span class="keywordtype">bool</span> checkDebounced(uint16_t now, uint8_t buttonState);</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160; </div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;    <span class="keywordtype">bool</span> checkInitialized(uint16_t buttonState);</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160; </div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;    <span class="keywordtype">void</span> checkEvent(uint16_t now, uint8_t buttonState);</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160; </div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    <span class="keywordtype">void</span> checkLongPress(uint16_t now, uint8_t buttonState);</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160; </div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;    <span class="keywordtype">void</span> checkRepeatPress(uint16_t now, uint8_t buttonState);</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160; </div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;    <span class="keywordtype">void</span> checkChanged(uint16_t now, uint8_t buttonState);</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160; </div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    <span class="keywordtype">void</span> checkReleased(uint16_t now, uint8_t buttonState);</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160; </div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <span class="keywordtype">void</span> checkPressed(uint16_t now, uint8_t buttonState);</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160; </div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;    <span class="keywordtype">void</span> checkClicked(uint16_t now);</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160; </div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    <span class="keywordtype">void</span> checkDoubleClicked(uint16_t now);</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160; </div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    <span class="keywordtype">void</span> checkOrphanedClick(uint16_t now);</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160; </div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;    <span class="keywordtype">void</span> checkPostponedClick(uint16_t now);</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160; </div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    <span class="keywordtype">void</span> checkHeartBeat(uint16_t now);</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160; </div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    <span class="keywordtype">void</span> handleEvent(uint8_t eventType);</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160; </div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;    ButtonConfig* mButtonConfig;</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160; </div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;    uint8_t mPin;</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160; </div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    uint8_t mId;</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160; </div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;    FlagType mFlags;</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160; </div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;    uint8_t mLastButtonState;</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160; </div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;    <span class="comment">// Internal states of the button debouncing and event handling.</span></div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;    <span class="comment">// NOTE: We don&#39;t keep track of the lastDoubleClickTime, because we</span></div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;    <span class="comment">// don&#39;t support a TripleClicked event. That may change in the future.</span></div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;    uint16_t mLastDebounceTime; <span class="comment">// ms</span></div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;    uint16_t mLastClickTime; <span class="comment">// ms</span></div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;    uint16_t mLastPressTime; <span class="comment">// ms</span></div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;    uint16_t mLastRepeatPressTime; <span class="comment">// ms</span></div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;    uint16_t mLastHeartBeatTime; <span class="comment">// ms</span></div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;};</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160; </div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;}</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html"><div class="ttname"><a href="classace__button_1_1AceButton.html">ace_button::AceButton</a></div><div class="ttdoc">An Adjustable Compact Event-driven (ACE) Button library that debounces and dispatches button events t...</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00054">AceButton.h:54</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a04b7e1d44e41481d2c36501262e35a04"><div class="ttname"><a href="classace__button_1_1AceButton.html#a04b7e1d44e41481d2c36501262e35a04">ace_button::AceButton::setButtonConfig</a></div><div class="ttdeci">void setButtonConfig(ButtonConfig *buttonConfig)</div><div class="ttdoc">Set the ButtonConfig associated with this Button.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00232">AceButton.h:232</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a0c63f30106e4688425ba37d8f7a9546b"><div class="ttname"><a href="classace__button_1_1AceButton.html#a0c63f30106e4688425ba37d8f7a9546b">ace_button::AceButton::kEventDoubleClicked</a></div><div class="ttdeci">static const uint8_t kEventDoubleClicked</div><div class="ttdoc">Button was double-clicked.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00074">AceButton.h:74</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a18c47304c694c6f084a343a7c83bef34"><div class="ttname"><a href="classace__button_1_1AceButton.html#a18c47304c694c6f084a343a7c83bef34">ace_button::AceButton::init</a></div><div class="ttdeci">void init(uint8_t pin=0, uint8_t defaultReleasedState=HIGH, uint8_t id=0)</div><div class="ttdoc">Reset the button to the initial constructed state.</div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00088">AceButton.cpp:88</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a21797e5e069da3f7bba42b40ab3a7305"><div class="ttname"><a href="classace__button_1_1AceButton.html#a21797e5e069da3f7bba42b40ab3a7305">ace_button::AceButton::kEventClicked</a></div><div class="ttdeci">static const uint8_t kEventClicked</div><div class="ttdoc">Button was clicked (Pressed and Released within ButtonConfig::getClickDelay()).</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00068">AceButton.h:68</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a244a2ea3166f2d886ccd94a44286b835"><div class="ttname"><a href="classace__button_1_1AceButton.html#a244a2ea3166f2d886ccd94a44286b835">ace_button::AceButton::getId</a></div><div class="ttdeci">uint8_t getId() const</div><div class="ttdoc">Get the custom identifier of the button.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00274">AceButton.h:274</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a279fc7e70cecaf94c12cb4dc1fb2ab18"><div class="ttname"><a href="classace__button_1_1AceButton.html#a279fc7e70cecaf94c12cb4dc1fb2ab18">ace_button::AceButton::AceButton</a></div><div class="ttdeci">AceButton(ButtonConfig *buttonConfig, uint8_t pin=0, uint8_t defaultReleasedState=HIGH, uint8_t id=0)</div><div class="ttdoc">Constructor that accepts a ButtonConfig as a dependency.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00192">AceButton.h:192</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a2e1fc3e4d97d5a390a9e00983cc780fe"><div class="ttname"><a href="classace__button_1_1AceButton.html#a2e1fc3e4d97d5a390a9e00983cc780fe">ace_button::AceButton::eventName</a></div><div class="ttdeci">static __FlashStringHelper * eventName(uint8_t event)</div><div class="ttdoc">Return the human-readable name of the event.</div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00079">AceButton.cpp:79</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a3c480636223edc899a79c821c32c6982"><div class="ttname"><a href="classace__button_1_1AceButton.html#a3c480636223edc899a79c821c32c6982">ace_button::AceButton::AceButton</a></div><div class="ttdeci">AceButton(uint8_t pin=0, uint8_t defaultReleasedState=HIGH, uint8_t id=0)</div><div class="ttdoc">Constructor defines parameters of the button that changes from button to button.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00160">AceButton.h:160</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a510c8e84a6bd79157489534a117814e3"><div class="ttname"><a href="classace__button_1_1AceButton.html#a510c8e84a6bd79157489534a117814e3">ace_button::AceButton::checkState</a></div><div class="ttdeci">void checkState(uint8_t buttonState)</div><div class="ttdoc">Version of check() used by EncodedButtonConfig.</div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00121">AceButton.cpp:121</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a5c253900d6d6c0035095a322ee7f9aa1"><div class="ttname"><a href="classace__button_1_1AceButton.html#a5c253900d6d6c0035095a322ee7f9aa1">ace_button::AceButton::getDefaultReleasedState</a></div><div class="ttdeci">uint8_t getDefaultReleasedState() const</div><div class="ttdoc">Get the initial released state of the button, HIGH or LOW.</div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00110">AceButton.cpp:110</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a769599d288f64dc0e55a69184596d804"><div class="ttname"><a href="classace__button_1_1AceButton.html#a769599d288f64dc0e55a69184596d804">ace_button::AceButton::kEventLongPressed</a></div><div class="ttdeci">static const uint8_t kEventLongPressed</div><div class="ttdoc">Button was held down for longer than ButtonConfig::getLongPressDelay()).</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00080">AceButton.h:80</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a7769fa58769bc4cf0a0ea9c68072d4de"><div class="ttname"><a href="classace__button_1_1AceButton.html#a7769fa58769bc4cf0a0ea9c68072d4de">ace_button::AceButton::setEventHandler</a></div><div class="ttdeci">void setEventHandler(ButtonConfig::EventHandler eventHandler)</div><div class="ttdoc">Convenience method to set the event handler.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00266">AceButton.h:266</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a7d309d463b50a59a202067a7228149f0"><div class="ttname"><a href="classace__button_1_1AceButton.html#a7d309d463b50a59a202067a7228149f0">ace_button::AceButton::getButtonConfig</a></div><div class="ttdeci">ButtonConfig * getButtonConfig() const</div><div class="ttdoc">Get the ButtonConfig associated with this Button.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00223">AceButton.h:223</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a940975bbdf673f6411b0efc008ba9981"><div class="ttname"><a href="classace__button_1_1AceButton.html#a940975bbdf673f6411b0efc008ba9981">ace_button::AceButton::isPressedRaw</a></div><div class="ttdeci">bool isPressedRaw() const</div><div class="ttdoc">Read the button state directly using ButtonConfig and return true if the button is in the Pressed sta...</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00337">AceButton.h:337</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_a9c4195cb128da40677ea223eb81743c9"><div class="ttname"><a href="classace__button_1_1AceButton.html#a9c4195cb128da40677ea223eb81743c9">ace_button::AceButton::kEventRepeatPressed</a></div><div class="ttdeci">static const uint8_t kEventRepeatPressed</div><div class="ttdoc">Button was held down and auto generated multiple presses.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00088">AceButton.h:88</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_aad25e42744fa8dd6a13ab483409a1833"><div class="ttname"><a href="classace__button_1_1AceButton.html#aad25e42744fa8dd6a13ab483409a1833">ace_button::AceButton::kEventLongReleased</a></div><div class="ttdeci">static const uint8_t kEventLongReleased</div><div class="ttdoc">Button was released after a long press.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00099">AceButton.h:99</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_ab33671acf4de4912b1f00fad28246ae0"><div class="ttname"><a href="classace__button_1_1AceButton.html#ab33671acf4de4912b1f00fad28246ae0">ace_button::AceButton::getPin</a></div><div class="ttdeci">uint8_t getPin() const</div><div class="ttdoc">Get the button's pin number.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00271">AceButton.h:271</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_abb9c10c1fc6df01fae071ccfcb906935"><div class="ttname"><a href="classace__button_1_1AceButton.html#abb9c10c1fc6df01fae071ccfcb906935">ace_button::AceButton::getLastButtonState</a></div><div class="ttdeci">uint8_t getLastButtonState() const</div><div class="ttdoc">Return the button state that was last valid.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00292">AceButton.h:292</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_ac1a720cb3ad156081a132ede781c5ea8"><div class="ttname"><a href="classace__button_1_1AceButton.html#ac1a720cb3ad156081a132ede781c5ea8">ace_button::AceButton::isReleased</a></div><div class="ttdeci">bool isReleased(uint8_t buttonState) const</div><div class="ttdoc">Returns true if the given buttonState represents a 'Released' state for the button.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00326">AceButton.h:326</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_ad198e86bd7270c871aaa27a33687399e"><div class="ttname"><a href="classace__button_1_1AceButton.html#ad198e86bd7270c871aaa27a33687399e">ace_button::AceButton::kEventHeartBeat</a></div><div class="ttdeci">static const uint8_t kEventHeartBeat</div><div class="ttdoc">An event that fires every time interval defined by getHeartBeatInterval().</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00111">AceButton.h:111</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_ada5bd7c31950e2acdb8a9464e795c13c"><div class="ttname"><a href="classace__button_1_1AceButton.html#ada5bd7c31950e2acdb8a9464e795c13c">ace_button::AceButton::kEventReleased</a></div><div class="ttdeci">static const uint8_t kEventReleased</div><div class="ttdoc">Button was released.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00062">AceButton.h:62</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_ae723d826fe219a8415764b9fed5d8976"><div class="ttname"><a href="classace__button_1_1AceButton.html#ae723d826fe219a8415764b9fed5d8976">ace_button::AceButton::kEventPressed</a></div><div class="ttdeci">static const uint8_t kEventPressed</div><div class="ttdoc">Button was pressed.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00059">AceButton.h:59</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_af710048a654fa5d5e45405661282a7b1"><div class="ttname"><a href="classace__button_1_1AceButton.html#af710048a654fa5d5e45405661282a7b1">ace_button::AceButton::check</a></div><div class="ttdeci">void check()</div><div class="ttdoc">Check state of button and trigger event processing.</div><div class="ttdef"><b>Definition:</b> <a href="AceButton_8cpp_source.html#l00116">AceButton.cpp:116</a></div></div>
<div class="ttc" id="aclassace__button_1_1AceButton_html_afe8e8e22146f510afa487e6ec98b6253"><div class="ttname"><a href="classace__button_1_1AceButton.html#afe8e8e22146f510afa487e6ec98b6253">ace_button::AceButton::kButtonStateUnknown</a></div><div class="ttdeci">static const uint8_t kButtonStateUnknown</div><div class="ttdoc">Button state is unknown.</div><div class="ttdef"><b>Definition:</b> <a href="ace__button_2AceButton_8h_source.html#l00119">AceButton.h:119</a></div></div>
<div class="ttc" id="aclassace__button_1_1ButtonConfig_html"><div class="ttname"><a href="classace__button_1_1ButtonConfig.html">ace_button::ButtonConfig</a></div><div class="ttdoc">Class that defines the timing parameters and event handler of an AceButton or a group of AceButton in...</div><div class="ttdef"><b>Definition:</b> <a href="ButtonConfig_8h_source.html#l00066">ButtonConfig.h:66</a></div></div>
<div class="ttc" id="aclassace__button_1_1ButtonConfig_html_a5dab877bf124bfdf5a5eb703ca123027"><div class="ttname"><a href="classace__button_1_1ButtonConfig.html#a5dab877bf124bfdf5a5eb703ca123027">ace_button::ButtonConfig::readButton</a></div><div class="ttdeci">virtual int readButton(uint8_t pin)</div><div class="ttdoc">Return the HIGH or LOW state of the button.</div><div class="ttdef"><b>Definition:</b> <a href="ButtonConfig_8h_source.html#l00317">ButtonConfig.h:317</a></div></div>
<div class="ttc" id="aclassace__button_1_1ButtonConfig_html_a6d9db3c7b221b474c3cfd8fca5f4ba1e"><div class="ttname"><a href="classace__button_1_1ButtonConfig.html#a6d9db3c7b221b474c3cfd8fca5f4ba1e">ace_button::ButtonConfig::EventHandler</a></div><div class="ttdeci">void(* EventHandler)(AceButton *button, uint8_t eventType, uint8_t buttonState)</div><div class="ttdoc">The event handler signature.</div><div class="ttdef"><b>Definition:</b> <a href="ButtonConfig_8h_source.html#l00182">ButtonConfig.h:182</a></div></div>
<div class="ttc" id="aclassace__button_1_1ButtonConfig_html_af916ea5ae0194afeac3a6fd6e25a13d1"><div class="ttname"><a href="classace__button_1_1ButtonConfig.html#af916ea5ae0194afeac3a6fd6e25a13d1">ace_button::ButtonConfig::setEventHandler</a></div><div class="ttdeci">void setEventHandler(EventHandler eventHandler)</div><div class="ttdoc">Install the EventHandler function pointer.</div><div class="ttdef"><b>Definition:</b> <a href="ButtonConfig_8h_source.html#l00390">ButtonConfig.h:390</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
